package formula;

class Formula {

	/**
	 * n!=sqrt(2*PI*n)*(n/e)^n
	 * 
	 * n!=sqrt(2*PI*n)*(n/e)^(n+1/(12*n+theta))
	 */
	public static int stirling(int n) {
		return (int) (((n + 0.5) * Math.log(n) - n + 0.5 * Math.log(2) + 0.5 * Math
				.log(Math.PI)) / Math.log(10)) + 1;
	}
}
